﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/List.Master" AutoEventWireup="true" CodeBehind="FunctionDefinedList.aspx.cs" Inherits="Honestysoft.Baseframework.WebUI.SystemManage.Init.FunctionDefinedList" %>
<%@ MasterType VirtualPath="~/MasterPage/List.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

            <div class="query_area">
                    功能名称：<asp:TextBox runat="server" ID="txtFuncName" CssClass="input2"></asp:TextBox>&nbsp;
                    <asp:Button runat="server" ID="btnSearch" CssClass="btn_normal" onMouseOver="this.className='btn_active'" onMouseOut="this.className='btn_normal'" Text="查找" />
            </div>
            <div class="button_area">
                <input type="button" id="btnNew" value="新增" onclick="javascript:openDialog('<%=Honestysoft.Baseframework.WebUI.Globals.Home %>SystemManage/Init/FunctionDefinedEdit.aspx', 500, 400, '新增功能定义');" class="btn_normal" onmouseover="this.className='btn_active'" onmouseout="this.className='btn_normal'" />               
                <asp:Button runat="server" ID="btnDelete" CssClass="btn_normal" 
                    OnClientClick="javascript:return getNoSelectionAlert('chkID','请选择要删除的记录后在执行此操作！');" 
                    onMouseOver="this.className='btn_active'" 
                    onMouseOut="this.className='btn_normal'" Height="20" Text="删除" 
                    onclick="btnDelete_Click" />
                <asp:Button runat="server" ID="btnActive" CssClass="btn_normal" 
                    OnClientClick="javascript:return getNoSelectionAlert('chkID','请选择要启用的记录后在执行此操作！');" 
                    onMouseOver="this.className='btn_active'" 
                    onMouseOut="this.className='btn_normal'"  Height="20" Text="启用" 
                    onclick="btnActive_Click" />
                <asp:Button runat="server" ID="btnCancel" CssClass="btn_normal" 
                    OnClientClick="javascript:return getNoSelectionAlert('chkID','请选择要禁用的记录后在执行此操作！');" 
                    onMouseOver="this.className='btn_active'" 
                    onMouseOut="this.className='btn_normal'"  Height="20" Text="禁用" 
                    onclick="btnCancel_Click" />
            </div>

            <table cellpadding="0" width="100%" cellspacing="0" border="1" class="t1" id="tGrid">
                   <thead>  
                        <th width="30px">
                            <input type="checkbox" name="chkAll" value="checkbox" onclick='javascript:checkAll(this,"chkID")' />
                        </th>
                        <th width="120px">父节点</th>    
                        <th width="120px">功能名称</th>  
                        <th width="80px">英文名</th>  
                        <th width="80px">功能类型</th>  
                        <th>URI</th>
                        <th width="50px">排序号</th>  
                        <th width="50px">是否有效</th>
                        <th width="160px">操作</th>
                  </thead>
              <asp:Repeater runat="server" ID="rptList">
                <ItemTemplate>
                    <tr>
                        <td style="text-align:center">
                            <input type="checkbox" name="chkID" id="chk<%# DataBinder.Eval(Container.DataItem,"ID") %>"  value="<%# DataBinder.Eval(Container.DataItem,"ID") %>" >
                        </td>
                        <td><%# DataBinder.Eval(Container.DataItem,"ParentID") %></td>
                        <td><%# DataBinder.Eval(Container.DataItem,"FuncName") %></td>
                        <td><%# DataBinder.Eval(Container.DataItem,"FuncEName") %></td>
                        <td><%# Honestysoft.EnumHelper.EnumInstance.GetEnumDataText(typeof(Honestysoft.Baseframework.Model.EnumItem.FunctionType), DataBinder.Eval(Container.DataItem,"FunctionType")+"") %></td>
                        <td><%# DataBinder.Eval(Container.DataItem,"URI") %></td>
                        <td><%# DataBinder.Eval(Container.DataItem,"SortCode") %></td>
                        <td><%# Honestysoft.Baseframework.WebUI.ScriptHelper.Image.GetBooleanImage(DataBinder.Eval(Container.DataItem,"IsValid")) %></td>
                        <td>
                            <%# GetButtonScript(DataBinder.Eval(Container.DataItem, "ID") + "", Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "IsValid")))%>
                        </td>
                    </tr>
                </ItemTemplate>
              </asp:Repeater>
                    <tr>
                        <td colspan="9" style="line-height: 28px;text-align:left;">
                            <frameworkwebcontrols:aspnetpager id="AspNetPager1" runat="server"
                                alwaysshow="true" firstpagetext="首页" lastpagetext="尾页" nextpagetext="下一页" pageindexboxtype="DropDownList"
                                prevpagetext="上一页" showpageindex="true" showcustominfosection="Right" submitbuttontext="Go"
                                textafterpageindexbox="页" textbeforepageindexbox="转到" currentpagebuttonposition="End"
                                layouttype="Div" custominfotextalign="Right" custominfohtml="共%RecordCount%条记录。第%CurrentPageIndex%页，共%PageCount%页，每页%PageSize%条"
                                direction="LeftToRight" onpagechanged="AspNetPager1_PageChanged">
                            </frameworkwebcontrols:aspnetpager>
                        
                        </td>
                    </tr>
            </table>
</asp:Content>
